﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace OrganizeYourSearch
{
    /// <summary>
    ///  Represents each instance of a Tag Object and provides the file location and other info of the instance
    /// </summary>
    public class TagInstanceDetail : INotifyPropertyChanged
    {
        public long InstanceId { get; set; }
        public long TagId { get; set; }
        public long StartPoint { get; set; }
        public long EndPoint { get; set; }

        public string Location { get; set; }
        public string DocTitle { get; set; }
        public string Description { get; set; }

        public TagInstanceDetail(long instId, long tgId, long stPt, long endPt, string loc, string docTit, string desc)
        {

            InstanceId = instId;
            TagId = tgId;
            StartPoint = stPt;
            EndPoint = endPt;
            Location = loc;
            DocTitle = docTit;
            Description = desc;
        }

        #region INotifyPropertyChanged Members
        //Property Changed Event
        public event PropertyChangedEventHandler PropertyChanged;
        // Function to explicitly raise the event PropertyChanged
        public void OnPropertyChanged(PropertyChangedEventArgs e)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, e);
            }
        }

        #endregion
    }
}
